//
//  CoreDataManager.h
//  CoreData 数据持久化
//
//  Created by 孙健 on 16/3/30.
//  Copyright © 2016年 孙健. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

typedef NS_ENUM(NSUInteger, STLZhuangTai) {
    STLHave = 1,
    STLNohave = 0,
    Error,
};

@interface CoreDataManager : NSObject





//  单例
+ (instancetype)shareCoreDataManager;



@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; //数据管理器类

@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;//数据模型器类

@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;//数据连接器类
// 保存数据
- (void)saveContext;
// 沙盒路径
- (NSURL *)applicationDocumentsDirectory;

- (STLZhuangTai)selectData:(NSString *)url WithName:(NSString *)name;



@end
